package com.baor.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baor.dao.DeliverDao;
import com.baor.domain.Deliver;
import com.baor.domain.ExceptionReportVO;
import com.baor.service.DelService;
import com.baor.util.R;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class DelServiceImpl implements DelService {
    @Autowired
    private DeliverDao deliverDao;

    @Override
    public R selectAll(Integer id) {
        MPJLambdaWrapper<Deliver> wrapper = new MPJLambdaWrapper<>(Deliver.class)
                .selectAll(Deliver.class)
                .eq(Deliver::getEquipmentId, id)
                .orderByDesc(Deliver::getCreateAt);
        return R.ok(deliverDao.selectList(wrapper));
    }
}
